package com.ningxia.water.controller;


import com.ningxia.water.reuslt.Result;
import com.ningxia.water.reuslt.ResultResponse;
import com.ningxia.water.service.ITsApplicantInfoService;
import com.ningxia.water.vo.out.ReportVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/statistical")
@Api(tags = "用水统计API")
public class StatisticalController {
    @Autowired
    private ITsApplicantInfoService applicantInfoService;

    @GetMapping("/getapplicantstatistical")
    @ApiOperation("获取用水户用水信息")
    public Result getApplicantStatistiacl(@RequestParam String type, @RequestParam String currentTime){
        List<ReportVo> list = applicantInfoService.getApplicantStatistical(type, currentTime);
        return ResultResponse.getSuccessResult(list);
    }
}
